package com.anxuan.demo.mapper;

import com.anxuan.demo.pojo.Players;
import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

public class PlayersRowMapper implements RowMapper<Players> {
    @Override
    public Players mapRow(ResultSet resultSet, int i) throws SQLException {
        Players players = new Players();
        players.setPlay_id(resultSet.getInt("player_id"));
        players.setTeam_id(resultSet.getInt("team_id"));
        players.setPlayer_name(resultSet.getString("player_name"));
        players.setHeight(resultSet.getFloat("height"));
        return players;
    }
}
